package com.ntes.provider3;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

/**
 * Created by june on 2017/5/28.
 */
@SpringBootApplication
@EnableEurekaClient
public class Provider3Application {

    public static void main(String[] args) {
        SpringApplication.run(Provider3Application.class, args);
    }

    @Bean
    @LoadBalanced //必须有 否则找不到host
    RestTemplate restTemplate() {
        return new RestTemplate();
    }
}
